<?php

require_once('../class.phpmailer.php');

$mail = new PHPMailer(); // defaults to using php "mail()"

$body = file_get_contents('contents.html');
//$body             = preg_replace('/[\]/','',$body);

//$mail->SetFrom('resia@dev.ppstream.com', 'First Last');
$mail->AddAddress("resia@dev.ppstream.com", 'fuck');

$mail->Subject = "PHPMailer Test Subject via mail(), basic";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

$mail->MsgHTML($body);

$mail->AddAttachment("images/phpmailer.gif"); // attachment
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment

$mail->PreSend();
$header = $mail->CreateHeader();
$body = $mail->CreateBody();
var_dump(mail("resia@dev.ppstream.com", "mail from pps", $body, $header));
die("\n" . date("Y-m-d H:i:s") . ',file:' . __FILE__ . ',line:' . __LINE__ . "\n");
if (!$mail->Send())
{
    echo "Mailer Error: " . $mail->ErrorInfo;
} else
{
    echo "Message sent!";
}
//print_r($mail->CreateBody());
//print_r($mail);
?>

</body>
</html>
